<!-- INCLUDE ../../../../templates/WoWMoonclaw01/page_header.html -->
<script language="JavaScript" type="text/javascript">
<!--
function check_form()
{
    if (document.post.category_name.value.length < 2)
    {
        alert('{MSG_NAME_EMPTY}');
        return false;
    }
    return true;
}               
//-->
</script>

<form method="post" action="{F_ADD_CATEGORY}" name="post" onsubmit="return check_form(this)">
<input name="{URI_ID}" type="hidden" id="{URI_ID}" value="{V_CATEGORY_ID}" />
<input type="hidden" name="compare_ids[]" value="{CATEGORY_ID}" />
<table width="100%" border="0" cellspacing="1" cellpadding="2">
  <tr>
    <th colspan="2">{L_ADD_CATEGORY}</th>
  </tr>
  <tr>
    <td nowrap="nowrap" class="row1">
      <div align="right"><label for="category_name">{L_NAME}:</label>
      </div>
    </td>
    <td width="100%" nowrap="nowrap" class="row2">
      <input name="category_name" type="text" class="input" id="category_name" value="{CATEGORY_NAME}" size="20" maxlength="30" />
    {FV_CATEGORY_NAME}</td>
    </tr>
  <tr>
    <td nowrap="nowrap" class="row1">
      <div align="right"><label for="category_display">{L_DISPLAY}:</label></div>
    </td>
    <td width="100%" nowrap="nowrap" class="row2">
      <input name="category_display" type="checkbox" value="Y" {CATEGORY_DISPLAY}  />
    </td>
  </tr>
  <tr>
    <td nowrap="nowrap" class="row1">
      <div align="right"><label for="category_display_order">{L_DISPLAY_ORDER}:</label>
      </div>
    </td>
    <td width="100%" nowrap="nowrap" class="row2">
      <input name="category_display_order" type="text" class="input" id="category_display_order" value="{CATEGORY_DISPLAY_ORDER}" size="3" maxlength="2" />
      {FV_DISPLAY_ORDER}</td>
    </tr>
  <tr>
    <th colspan="2" class="row1">
<div style="padding:.25em;">
    <!-- IF S_ADD -->
    <input type="submit" name="add" value="{L_ADD_CATEGORY}" class="mainoption" /> <input type="reset" name="reset" value="{L_RESET}" class="liteoption" />
    <!-- ELSE -->
    <input type="submit" name="update" value="{L_UPDATE_CATEGORY}" class="mainoption" /> <input type="submit"  name="delete" value="{L_DELETE_CATEGORY}" class="liteoption" />
    <!-- ENDIF -->
</div>
    </th>
  </tr>
</table>
</form>
<!-- IF S_ADD == 0 -->
<br />
<form method="post" action="{F_SETS}" name="post">
<input name="set_category_id" type="hidden" id="set_category_id" value="{CATEGORY_ID}" />
<table width="100%" border="0" cellspacing="1" cellpadding="2">
  <tr>
    <th align="center" width="20" nowrap="nowrap">&nbsp;</th>
    <th align="left" width="20" nowrap="nowrap">&nbsp;</th>
    <th width="200" align="left">{L_NAME}</th>
    <th align="left">{L_CLASS}</th>
    <th>&nbsp;</th>
  </tr>
<!-- IF S_HAS_SETS -->
<!-- List existing sets below + ability to delete -->
  <!-- BEGIN sets_row -->
  <tr class="{sets_row.ROW_CLASS}">
    <td width="20" nowrap="nowrap">
		<div align="center"><input name="compare_ids[]" type="checkbox" id="compare_ids[]" value="{sets_row.ID}" /></div>
	</td>
    <td width="20" nowrap="nowrap">
    	<div align="center">{sets_row.COUNT}</div>
    </td>
    <td width="200" nowrap="nowrap"><a href="{sets_row.U_VIEW_SET}"><img src="images/view.gif" width="16" height="16" border="0"></a>{sets_row.NAME}</td>
    <td nowrap="nowrap">{sets_row.CLASS}</td>
    <td>&nbsp;</td>
  </tr>
  <!-- END sets_row -->
  <tr>
    <th colspan="5" class="footer">{LISTSETS_FOOTCOUNT}</th>
  </tr>
<!-- ENDIF -->
  <tr>
    <th colspan="5">
		<div style="padding:.5em;">
        <input name="submit" type="submit" class="liteoption" id="addset" value="{L_ADD_SET}" /><!-- IF S_HAS_SETS -->&nbsp;
        <input name="delete" type="submit" class="liteoption" id="deleteset" value="{L_DELETE_SET}" /><!-- ENDIF -->
		</div>
    </th>
  </tr>
</table>
</form>
<!-- ENDIF -->
<!-- INCLUDE ../../../../templates/WoWMoonclaw01/page_tail.html -->
